Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(driver): fix protocol timeout being ignored for isolated eval #15826

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

connorjclark
Copy link
Collaborator

I noticed this when attempting to increase the timeout for executionContext.evaluate did not change the timeout used.

Only fetchElementWithSizeInformation is existing code which attempted to set a timeout. In that case, the intention was to wait no more than 250ms. That regressed with #14005

@connorjclark connorjclark requested a review from a team as a code owner February 21, 2024 23:39
@connorjclark connorjclark requested review from adamraine and removed request for a team February 21, 2024 23:39
Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lighthouse ✅ Ready (Inspect) Visit Preview Feb 21, 2024 11:39pm

@@ -120,6 +120,27 @@ describe('.evaluateAsync', () => {
await expect(evaluatePromise).rejects.toBeTruthy();
});

it('uses the specific timeout given (isolation)', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this did not actually fail without the fix, b/c sendCommand is mocked so nothing resets _nextProtocolTimeout.

I wasn't sure how to fix the mock test, and didn't want to deal with fixing fake code...

@brendankenny besides nuking mocks wyd?

@connorjclark connorjclark changed the title core(driver): fix setNextProtocolTimeout being ignored for isolated eval core(driver): fix protocol timeout being ignored for isolated eval Feb 26, 2024
@connorjclark connorjclark merged commit 034c0a1 into main Feb 26, 2024
30 checks passed
@connorjclark connorjclark deleted the eval-isolate-timeout branch February 26, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants